#include<iostream>
using namespace std;
int main(){
	int y=100;
	for(int i=0;i<900;i++){ 
		int x=y;
		int o=x%10;
		x=x/10;
		int j=x%10;
		x=x/10;
		int k=x;
		if((y%11)==(o*o+j*j+k*k)){
			cout<<y<<" ";
		}
		y++;
	}
}
